import 'package:flutter/material.dart' as mt;
import 'package:flutter_projectname_getx/page/index/index_view.dart';
import 'package:flutter_projectname_getx/page/my/my_view.dart';
import 'package:flutter_projectname_getx/page/test/test_view.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:get/get.dart';

class BottomNavModel {
  String label;
  dynamic icon;
  mt.Color color;
  mt.Widget page;

  BottomNavModel({this.label, this.icon, this.color, this.page});
}

class BottomBarWidgetLogic extends GetxController {
  RxInt currentIndex = 0.obs;
  final mt.Color selectedItemColor = mt.Colors.red;
  RxList<BottomNavModel> listData = ([
    BottomNavModel(
        label: "菜单1", icon: mt.Icon(FontAwesomeIcons.home), page: IndexPage()),
    BottomNavModel(
        label: "菜单2", icon: mt.Icon(FontAwesomeIcons.freeCodeCamp),page: TestPage()),
    BottomNavModel(
        label: "菜单3", icon: mt.Icon(FontAwesomeIcons.userAlt), page: MyPage()),
  ]).obs;

  setCurrentIndex(value) {
    currentIndex.value = value;
  }
}
